Starting a new project

Started by Andre, November 24, 2010, 03:43:21 PM

Previous topic - Next topic

Andre

Hey there,

I am currently trying to start an Android project utilizing JPCT, but I get stuck at some points.

Mainly, I need an example of how to move and animate an object within a level.

There are multiple functions that could point at the current position ( Origin, Center, TransformedCenter) and I don't know, for example how transalte() effects either of them.

Could someone maybe post an example on how to move an object. If possible with additional animation.

Best regards

André

Kaiidyn

How to start
Google for eg. jpct Moving object.\

Basically when you want to move an object you use translate(x,y,z) or translate(new SimpleVector(x,y,z)) in the renderloop
the translate works in object-space, so just putting 1 in the x will continually move the object to the right.
Clean code is simple and direct. Clean code reads like well-written prose. Clean code never obscures the designer's intent but rather is full of crisp abstractions and straightforward lines of control. - Grady Booch

EgonOlsen

You may want to have a look at the advanced example. It's for the desktop version and does some more stuff, but it also shows an animated and moving object. The code for jPCT-AE is almost the same regarding animations and translations.