Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Im using ANDEngine and wants to create confetti particle system.

But im unable to make flipping and rotation of confetti particle around z-axis Since andengine is 2d engine, it doesnot support that.

However like in the following example , 3d rotation has been implemented for a single sprite:

http://code.google.com/p/andengineexamples/source/browse/src/org/anddev/andengine/examples/Rotation3DExample.java

I want to do this for the particles. Am i missing something ? or do i hv to modify the particle system code.

share|improve this question
    
What's the problem? Have you tried doing it for the particles? How to modify a library to add additional features is a bit too broad a question for this site. You should try adding the rotation and if you come up against a specific problem, as that question here. –  Byte56 Aug 30 '13 at 14:09
    
I have done the rotation thing. But since it is the 2d engine , i cannot rotate on z axis, For rotation on z-axis, u have to modify your sprite's applyRotation method as i have mentioned in my link of andengine example. I want to create flipping effect on particles. which can only be done via 3d rotation –  asma.farhat Aug 31 '13 at 12:56
    
Actually it would be possible to simulate that with some very clever scaling. –  Byte56 Aug 31 '13 at 14:22
    
I found this written smwhere in stackoverflow , i guess this is the same as ur telling : A simple approach is to scale the Sprite as it moves back in distance. Just treat the scale property as a Z depth. But beware of Z-sorting (when items in depth overlap). In a simple game like paper toss this will not be a problem. But for example, if your object passes through a hoop, you will find it gets hard to manage. –  asma.farhat Aug 31 '13 at 14:41
    
Just use rotation like the example you linked shows: pGL.glRotatef(rotation, 0, 1, 0); Where rotation is the amount to want to rotate and the last three values define the axis of rotation. –  Byte56 Aug 31 '13 at 14:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.