For the millionth time... Keyboard input.

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Kannon
Posts: 20
Joined: Wed Jun 14, 2006 7:27 am

For the millionth time... Keyboard input.

Post by Kannon »

I know, this question has been asked to death, is the subject of a whole tutorial (almost), and the bane of countless newbies.... but here's one more, desperately seeking help. (/Rambling Text)

Basically, I'm curious of how one would program an application that could rotate, and move an object along the models Z axis (whichever way it rotates). Every attempt I've made has lead to compile errors, or the endlessly annoying "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." Something about a pure virtual method. I'd use a debugger on the stupid thing, but one of those refuses to function on either of my computers as well. :evil:

So, I'm basically looking for a novel easily extensible way to add commands from keyboard input. I really don't care if it's the ugliest hack in existance. Once I'm more familiar with Irrlicht, I can refine it.
"That is not dead which can eternal lie, And with strange aeons even death may die."
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Re: For the millionth time... Keyboard input.

Post by bitplane »

well to move a model forwards along its axis, take a forward vector, transform it by the scene node's transformation matrix, like so-

Code: Select all

  core::vector3df forwardsZ(0,0,distance);
  node->getAbsoluteTransformation().transformVect(forwardsZ);
  node->setPosition( node->getPosition() + forwardsZ);
Kannon wrote:Every attempt I've made has lead to compile errors, or the endlessly annoying "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."
sounds like you're not familiar with pointers. you need at least some understanding of pointers and classes before attempting to use irrlicht
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
stodge
Posts: 216
Joined: Fri Dec 05, 2003 5:57 pm

Post by stodge »

"sounds like you're not familiar with pointers. you need at least some understanding of pointers and classes before attempting to use irrlicht"

Agreed. You should learn how to develop in C++.
Kannon
Posts: 20
Joined: Wed Jun 14, 2006 7:27 am

Post by Kannon »

Yep, I'm pretty clueless about pointers... I should do some research. I'm decent with classes though. At least that gives me a direction to research in.

I'm really not a programmer, just been forced into the role. I'm learning as I go, but some additional research would probably help. Thanks for the pointer. (cymbal crash)
"That is not dead which can eternal lie, And with strange aeons even death may die."
stodge
Posts: 216
Joined: Fri Dec 05, 2003 5:57 pm

Post by stodge »

Kannon wrote:Yep, I'm pretty clueless about pointers... I should do some research. I'm decent with classes though. At least that gives me a direction to research in.

I'm really not a programmer, just been forced into the role. I'm learning as I go, but some additional research would probably help. Thanks for the pointer. (cymbal crash)
*rimshot*
Post Reply