Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Height mapped terrain and sparkys collision

Author
Message
NoviceNate333
11
Years of Service
User Offline
Joined: 7th Dec 2012
Location: United States
Posted: 17th May 2015 06:20 Edited at: 17th May 2015 06:24
Hi, Me and my friend are stuck on this problem... we are trying to use height maps for the terrain and be able to load objects in, such as stairs or a bridge, and be able to detect collision with both the terrain and the objects. The camera is positioned to the height of the terrain and we don't know how to keep the y collision with the object and camera with out falling through the terrain, or not being able to walk on top of an object.



Example



I cannot walk over the bridge.... I just go straight through the bridge, but i can collide the the sides of the bridge.

Attachments

Login to view attachments
The Tall Man
11
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 22nd May 2015 22:39
Objects are stored twice, once for rendering, and once for collision calculations. Scaling an object will affect the rendering copy, but often not the collision copy. There's a function that enables wireframe rendering of collision data, so you can see how it compares with the visible object.

You can experiment with scaling the object before setting up its collision (i.e. if you're using a 3rd party collision system), and/or you can look for an UpdateCollision command for whichever collision system you're using, after scaling the object.

Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.
The Tall Man
11
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 25th May 2015 22:50 Edited at: 25th May 2015 22:51
Oh, I hadn't noticed from your title that you're using Sparky's. That's what I use too. Sparky's has an Update Collision command that you need to call after setting the scale for your object.

Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.
NoviceNate333
11
Years of Service
User Offline
Joined: 7th Dec 2012
Location: United States
Posted: 27th May 2015 04:20
I use the SC_allowObjectScaling but when i call it it doesn't change anything it still keeps the original size for collision.
The Tall Man
11
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 27th May 2015 21:37
Try calling SC_UpdateObject().

Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.

Login to post a reply

Server time is: 2024-11-16 16:46:24
Your offset time is: 2024-11-16 16:46:24