www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Andre on November 24, 2010, 03:43:21 pm

Title: Starting a new project
Post by: Andre on November 24, 2010, 03:43:21 pm
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é
Title: Re: Starting a new project
Post by: Kaiidyn on November 24, 2010, 06:47:16 pm
How to start (http://www.jpct.net/wiki/index.php/Main_Page#How_to_start)
Google (http://www.google.com/) 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.
Title: Re: Starting a new project
Post by: EgonOlsen on November 24, 2010, 08:46:02 pm
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.