lonwolf
01-07-2006 12:31:19
hello ive been surfing this forum and i found some ideeas of movin a char
but i cant seem to put togheter a workin code..
i have a working simple gravity callback but i cant make a simple moving one: the reason HOW can i Calculate the direction/moving vector so i can add it to the body...
so my request is if there is someone who can show/give nice example of a movin calback that will drag the caracter and make him move forward whatever its orientation...
10xz in advance
Hansel
02-07-2006 10:20:09
You need to move the body using forces. For example:
// move forward
if (mInputDevice->isKeyDown(KC_UP))
{
Vector3 direction = ash->get_node()->getOrientation( ) * Vector3::UNIT_Z;
ash->get_body()->setVelocity(ash->get_body()->getVelocity()*Vector3(0,1,0) + direction*(10)*Vector3(1,0,1)*size_factor);
}
Try it
lonwolf
02-07-2006 10:50:32
thankz @Hansel ill try it a bit later when ill start working... lets hope thats gonna work [-o<
One question what is SIZE_FACTOR>??<
Hansel
02-07-2006 14:18:28
Forget size_factor, it`s a parameter to adjust the velocity of Ash according to his size
lonwolf
03-07-2006 17:03:43
ok i tryed your code.. its awsome 10xz but its going backwards
so i replaced UNIT_Z with NEGATIVE_UNIT_Z and is goin normal
.
well... almo0st normal
when it hits the ground (anyway it bounces
) and it starts rotating
seting up friction 0 and elasticity 0
with OgreNewt Materials will do the trick?
if you have done that allready i could use some help
10xz
lonwolf
03-07-2006 21:03:59
man u are a true helper 10xz a lot.. Ill trry that in the mornin cuz here its 22:55 pm
what can i say more thankz a lot. i think there are about 4 of us that surf this forum daily
lonwolf
04-07-2006 12:36:33
man thanks a lot you saved me from 2 hours of searching throughout the forum and tutorials. If you need anything related to ogre or ogrenewt just ask becoz i have a huge prject
with lots of things in it
Hansel
05-07-2006 11:03:57
What's you project? I have curiosity
lonwolf
05-07-2006 11:06:12
im makin a rpg/mmorpg game and its infrastructure its done after 6 months of work. And now we just have to make the models and programm the interaction with the enviroment
and now im workin on the AI
Hansel
05-07-2006 11:15:56
It sounds very complex, how many people are working with you? Do you have any artwork or screen?
Hope you'll finish it well
lonwolf
05-07-2006 11:19:16
there are 3 of us and the release date is in september .. i dont know if im allowed to post the site but i hope no one will be mad on me
http://www.lhok.as.ro
there you can see some screenshots and later when we will implement other models in the game and the AI ill post new screens
Hansel
05-07-2006 11:44:41
I've probed the alpha version and the gui implementation looks very impressive. I like your work
Are those trees modelled in max?
lonwolf
05-07-2006 11:48:21
yes they are exported from max.. Its from the base vedetaion from max but later on well model one of our own.. and i found on some sites vegetation packs ... with tropical trees and ... eh.. very impresive..
Glad you like it
ill hope to hear your opinion on the release
Btw which country are you from???
lonwolf
05-07-2006 18:18:57
yeah, Romania
keep up the good work.. and im on the way of implementing the AI.. its not that hard after i read some articles.. if u have probs related to this subject or other please feel free to ask ill help as much as i can