About Store Forum Documentation Contact



Post Reply 
decal below selected object
Author Message
yvanvds Offline
Member

Post: #1
decal below selected object
Hi

I'm trying to put a decal below an object when it is selected. Are there any tutorials about this? I looked at the 'small overlays' example and found out how to get a handle to the object my mouse points to with the function Physics.ray(). Is that the way to go? (EDIT: ah yes it is. I overlooked the 'Detecting objects under cursus' tutorial that does the same thing.)

For the actual decal, i made a struct based on Game::Item, with a Decal object in it. I'm overruling the create function, and want to place the decal below the object, on the terrain. I'd hide it if the object is not selected.

But i'm not sure how to get the terrain position below the object. In the decal example, there is a terrain defined as a meshgroup and you can get the position with PosPointMeshY(). But what if the whole world comes from a file made in the worldeditor? Does Game::World give me access to the terrain mesh somehow?

Thanks, yvan
(This post was last modified: 07-24-2010 06:57 PM by yvanvds.)
07-24-2010 06:34 PM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #2
RE: decal below selected object
"decal name".terrain_only=true;
07-25-2010 08:18 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: decal below selected object
tutorial "fast shadows" draws decals under objects
07-25-2010 09:57 AM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #4
RE: decal below selected object
(07-25-2010 09:57 AM)Esenthel Wrote:  tutorial "fast shadows" draws decals under objects

Ah, i missed that tutorial. It's working great now! Thanks.
07-25-2010 07:59 PM
Find all posts by this user Quote this message in a reply
Post Reply