Jump to content

Drawing circles


Rekindled Phoenix
 Share

Recommended Posts

Are there examples within the community that draw a circle using the cameras perspective? Like the sandbox paintbrush, I need to display a radius around an object using DrawLine() or something similar.

 

I've looked at how this wiki link does it, possibly transpose the vectors.

 

 

How would you draw a circle aligned to the terrain?

Link to comment
Share on other sites

A circular 'ring' mesh that uses the same vert shader as vegetation to keep it aligned to terrain. Offset it above the origin a bit.

There used to be a terrain decal in downloads somewhere that might be good enough.

 

Another approach is to use a spotlight with a material to project a texture image (might need to replace the spotlight.gmf model with something that is invisible). Good for RPG style spell effects.

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

A circular 'ring' mesh that uses the same vert shader as vegetation to keep it aligned to terrain. Offset it above the origin a bit.

There used to be a terrain decal in downloads somewhere that might be good enough.

 

yes, Gandi's decal in the script asset was what i was referring to... unfortunately, the link is dead at the moment. Hopefully Gandi can upload it again. It works nicely. Unfortunately, it will not work without modifying it slightly due to this bug:http://www.leadwerks.com/werkspace/tracker/issue-187-terrain-resolution-not-working/page__gopid__859#entry859. You would just have to hardcode the terrain resolution into the script to get it to work.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...