How would I go about applying a perspective tranformation (just like in photoshop) to a sprite? Are there any cocos2d functions that I have missed, or would I use OpenGL | ES? If so, what calls? (Unfamiliar with OpenGL)
Sprite manipulation
(6 posts) (2 voices)-
Posted 1 year ago #
-
If it helps, I want to skew (I remembered the word!) the sprite, but be able to rotate it. Say you held a CD in front of you, you are looking straight at the top of it. That is my sprite. Now rotate the CD so you are now looking at it in a 3D sort of way. Now rotate the CD about the center hole. That is what I want to be able to achieve.
Posted 1 year ago # -
Maybe you're looking for the CCOrbitCamera action?
http://www.cocos2d-iphone.org/api-ref/latest-stable/interface_c_c_orbit_camera.html
Running that action on your sprite should get the effect I think you're looking for. Check out the sample projects (ActionsTest) that you can run from the main cocos2d download. There should be a demonstration.
Posted 1 year ago # -
Exactly what I was looking for. Thanks!
Posted 1 year ago # -
So the CCOrbitCamera looks like what I want, but I am being very dumb and can't figure out the values to make it do what I want.
What would the values be for
[CCOrbitCamera actionWithDuration:5 radius:r deltaRadius:dr angleZ:z deltaAngleZ:dz angleX:x deltaAngleX:dx];
r = ?
dr = ?
z = ?
dz = ?
x = ?
dx = ?Posted 1 year ago # -
bumpidy bump bump bump
Posted 1 year ago #
Reply
You must log in to post.