Walking on water, water as terrain
by Tom · in Torque Game Engine · 09/05/2006 (2:33 pm) · 7 replies
Hi,
so yesterday i got this idea that it would be cool if the player could walk on water,
so i made teh water density high, 200, and the player density 100,
i tested it, and the player bobs all over the place and jumps around, not what i wanted, it seems like the player is more or less moving on a giant water liek trampoline:S
so here is a question for anyone who might be interested in doing somethign like this, or just seeks a challenge!
how can you change teh parameters...maybe liquid type?....so that the player can move on the water just like he would move ont eh terrain, with the water splashes? (like when the player now moves, little splashes fromt he impact occure, this is perfect effect)
if anyone would like to contribute or share information plz feel free to do so, since this is not essential, im throwing this out there as a fun project/challenge for those more talented with code then others
plz note: if engine modifications are required, post a message and i will make a thread int he private room for this with the engine changes.
looking forward on input/idea/thoughts/?solutions?
-Tom-
so yesterday i got this idea that it would be cool if the player could walk on water,
so i made teh water density high, 200, and the player density 100,
i tested it, and the player bobs all over the place and jumps around, not what i wanted, it seems like the player is more or less moving on a giant water liek trampoline:S
so here is a question for anyone who might be interested in doing somethign like this, or just seeks a challenge!
how can you change teh parameters...maybe liquid type?....so that the player can move on the water just like he would move ont eh terrain, with the water splashes? (like when the player now moves, little splashes fromt he impact occure, this is perfect effect)
if anyone would like to contribute or share information plz feel free to do so, since this is not essential, im throwing this out there as a fun project/challenge for those more talented with code then others
plz note: if engine modifications are required, post a message and i will make a thread int he private room for this with the engine changes.
looking forward on input/idea/thoughts/?solutions?
-Tom-
#2
*edit
Sorry
I just looked at my old code, it was for making wheeled vehicles collide with water, not the player.
10/13/2006 (6:17 pm)
Its one small engine change to have the player collide with a water block, post in a private forum and ill show you.*edit
Sorry
I just looked at my old code, it was for making wheeled vehicles collide with water, not the player.
#3
chris, do you think i could maybe still see the collision with the wheeled vehicle collide with water?
it might be able to make me look in the direction i need to go to make this work.
i would really appreciate it.
also, thanks greg, the dif solution works great for a smaller portion of that big lake, but for my big lake its not really that good:( thank you anyway (for now i have an invisible wall for the big lake, so thank you for the small lake solution))
10/14/2006 (11:34 am)
I added a thread in the private engine forum, under walking on water. chris, do you think i could maybe still see the collision with the wheeled vehicle collide with water?
it might be able to make me look in the direction i need to go to make this work.
i would really appreciate it.
also, thanks greg, the dif solution works great for a smaller portion of that big lake, but for my big lake its not really that good:( thank you anyway (for now i have an invisible wall for the big lake, so thank you for the small lake solution))
#4
10/14/2006 (1:22 pm)
In wheeledvehicle.cc i added waterobjecttype to the collision mask
#5
It works very well, except that it only starts to work the second time around. I get into the buddy and drive right to the water and the buggy follows the terrain and goes into the water block. Then I back out and go back to the water block and it works perfectly fine. Any reason why it doesnt work the first time?
10/22/2006 (9:19 am)
I added the WaterObjectType to the collision mask in wheeledvehicle.cc, recompiled and started the game.It works very well, except that it only starts to work the second time around. I get into the buddy and drive right to the water and the buggy follows the terrain and goes into the water block. Then I back out and go back to the water block and it works perfectly fine. Any reason why it doesnt work the first time?
#6
louis, it might be that the car might actualy sort of jump into the water, *not recognizing it*, then when you back up, and drive onto it, it see it.
try to stop before the edge of the water, and then drive slowly onto it, that should do it. (if it is, then you jsut need to change some parameters in the source, if it isn't, then i really dont know)
i hope this helps,
thansk again for everyone who responded
10/22/2006 (9:35 am)
Because of school, i hadnt had any time to continue to test these things, so i would like to apologize, im looking forward to christmas (when i will have time again to start up the ol'torque engine)louis, it might be that the car might actualy sort of jump into the water, *not recognizing it*, then when you back up, and drive onto it, it see it.
try to stop before the edge of the water, and then drive slowly onto it, that should do it. (if it is, then you jsut need to change some parameters in the source, if it isn't, then i really dont know)
i hope this helps,
thansk again for everyone who responded
#7
The best thing I could do was to have it spawn already on the water, this seems to force it to stay on water. This is what I am pretty much looking to do anyways, so it all works out!
Thanks!
10/22/2006 (9:49 am)
Thanks Tom.The best thing I could do was to have it spawn already on the water, this seems to force it to stay on water. This is what I am pretty much looking to do anyways, so it all works out!
Thanks!
Torque Owner Greg_ESAL