How to make character fly?
by Alexander B · in Torque Game Engine · 07/19/2008 (3:55 am) · 12 replies
In my game i want the character to be able to fly. I don't really care about animations or anything i just want my character to fly in the air. I want it so when i click or hold down a buton (not having to hold it down would be better) my character will go up into the air.
What would be the simplest way to do this?
What would be the simplest way to do this?
#2
07/19/2008 (5:14 am)
That is a bit out of date and to hard for me. Is there any other guides on how to do it?
#3
Change this line in Player::updateMove
to
Then you should be able to add a console method to changed the value of mFly.
07/19/2008 (5:52 am)
This is just a theory, I don't know if it will work, but I think it should.Change this line in Player::updateMove
...
if(runSurface) {
...to
...
if(runSurface || mFly) {
...Then you should be able to add a console method to changed the value of mFly.
#4
07/19/2008 (6:00 am)
What file is Player::updateMove in?
#5
07/19/2008 (6:36 am)
Player.cc
#6
I know that you want to code your own, and you may already have done a lot of engine changes, but if time is of the essence, and you are at the beginning of a new project, this is already built in.
If you really really need it, I could do a video screen capture of it next week, since you need to purchase it in order to see it I think.
07/19/2008 (6:50 am)
Flying in included in the ArcaneFX Core pack. It's part of the "experimental spells" bank. I bought ArcaneFX a few years ago and I re-downloaded the most recent update and it's right in there.I know that you want to code your own, and you may already have done a lot of engine changes, but if time is of the essence, and you are at the beginning of a new project, this is already built in.
If you really really need it, I could do a video screen capture of it next week, since you need to purchase it in order to see it I think.
#7
EDIT: I don't really want to pay $50 just for my character to fly and a couple of other spells. I would rather learn that by my self.
07/19/2008 (5:11 pm)
I can't find if (runSurface) in player.ccEDIT: I don't really want to pay $50 just for my character to fly and a couple of other spells. I would rather learn that by my self.
#8
"Couple of other spells" doesn't really do AFX justice. It's awesome! The effects (not just spells) you can make are outstanding, and you get other cool things that are great for any game, i.g. Movement locks and Datablock Caching.
Look in Player::updateMove, there should be some sort of check to see if the player is on a surface, and then a bunch of movement code. Try searching for "mContact" inside updateMove.
07/19/2008 (5:56 pm)
"Couple of other spells" doesn't really do AFX justice. It's awesome! The effects (not just spells) you can make are outstanding, and you get other cool things that are great for any game, i.g. Movement locks and Datablock Caching.
Look in Player::updateMove, there should be some sort of check to see if the player is on a surface, and then a bunch of movement code. Try searching for "mContact" inside updateMove.
#9
07/19/2008 (6:32 pm)
Alex, trust me, the AFX is much more then you think it is. Trust me. It has several fixes and additions that make any leap to what you are doing, much , much easier.
#10
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=14025
07/19/2008 (6:41 pm)
Here is another player flying resource you might want to take a look at:www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=14025
#11
07/19/2008 (7:55 pm)
Yes, that was the resource I put in, there are barely any bugs, but it interfers with many other resource you might implement.
#12
07/19/2008 (10:18 pm)
Tyler your resource was great. I can now fly ingame. Thanks.
Torque Owner Nathan Kent