|
Someone make this not look so bad. please. |
Senior Member
Join Date: Oct 2008 Posts: 268 |
If I make 3 different buildings, with 3 different heights. |
|||
|
#2 |
|||||
|
Realmware CTO
Join Date: Feb 2008 Posts: 1,485 |
I'd recommend you just use SimpleDynamics for now, which employs gravity and scene Heightmap. Whenever an object "lands" on the ground from a fall, it calls the object's "OnLanded" event handler, where you can check the velocity of the impact. So I'd recommend that you just deliver damage to the avatar as a function of the "Y" velocity (downward) upon landing. Then if the avatar runs out of health, they die (already implemented). |
||||
|
#3 |
|||||
|
Senior Member
Join Date: Oct 2008 Posts: 268 |
nice, I will love it! Last edited by levalencia : 10-22-2008 at 05:04 AM. |
||||
|
#4 |
|||||
|
Realmware CTO
Join Date: Feb 2008 Posts: 1,485 |
The OnLanded handler is a virtual method that gets called by Simple Dynamics, and so there isn't an event to register for, but rather just a method to write. In Beta 3.0, these hard-coded methods will be replaced more flexible events. |
||||
|
#5 |
|||||
|
Senior Member
Join Date: Oct 2008 Posts: 268 |
Najak. Last edited by levalencia : 10-22-2008 at 09:07 PM. |
||||
|
#6 |
|||
|
Realmware CTO
Join Date: Feb 2008 Posts: 1,485 |
For Beta 2.4 you can either define an "OnLanded" command/activity for the avatar, or you can just override the "OnLanded(..)" method in the Avatar class, and call your code from there. So right now, it *does* act as both a hard-coded override as well as an event called "OnLanded". |
||