Changing Player Behaviour
by Matthias Georgi · in Torque Game Engine · 01/06/2006 (5:06 pm) · 2 replies
I'm fiddling round in the player class to manipulate the gravity and velocity behaviour.
It seems that player.cc was pretty much coded for first person shooters.
Are there some resources which could give me a drop-in replacement for player.cc or something blank to build on or do i have to take the modding route?
It seems that player.cc was pretty much coded for first person shooters.
Are there some resources which could give me a drop-in replacement for player.cc or something blank to build on or do i have to take the modding route?
About the author
Integration of Torque and Ruby
#2
After reading the source, especially the UpdateMove method, I added one line which did the trick:
This overwrites most of the calculations like gravity.
But I couldnt find the part which detects the player - terrain collision.
If i take the flying vehicles, I have to mount my player on the vehicle, I guess.
Is this the preferred way to realize airplanes and spaceships?
01/07/2006 (3:20 am)
Thanks for your answer, Jesse.After reading the source, especially the UpdateMove method, I added one line which did the trick:
acc = moveVec * moveSpeed;
This overwrites most of the calculations like gravity.
But I couldnt find the part which detects the player - terrain collision.
If i take the flying vehicles, I have to mount my player on the vehicle, I guess.
Is this the preferred way to realize airplanes and spaceships?
Torque Owner Jesse Motes
one of the resources i've looked at is the www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5071 flying vehicle resource.
i read one a few weeks ago that someone was going to release a gravity resource, but i dont have the link handy. in the thread i saw he actually posted the code. it was on the first page of one of these forums a few weeks ago so it cant have gone far.
*edit*
oh and Ben Garney made mention in one of those threads that the vehicle class is much more suited for altering the gravity dynamics, but someone mentioned its still very Z axis oriented. i'm by no means skilled enough to say i have a clue what they're talking about yet. wish i did though, as i want to do exactly this :)