Author Topic: Starting a new project  (Read 2279 times)

Offline Andre

  • byte
  • *
  • Posts: 1
    • View Profile
Starting a new project
« 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


Offline Kaiidyn

  • long
  • ***
  • Posts: 103
    • View Profile
Re: Starting a new project
« Reply #1 on: November 24, 2010, 06:47:16 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12064
    • View Profile
Re: Starting a new project
« Reply #2 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.