Vector shapes
I think I see what you might be trying to go for but shouldn't it be:
glTranslatef(cpBodyGetPos(ball.body).x/size.width - 0.5*viewAspect, cpBodyGetPos(ball.body).y/size.height - 0.5, 0.0)
I don't know what "size" is referring to though.
Also, I still think you want the inverse of the ball motion.
glTranslatef(cpBodyGetPos(ball.body).x/size.width - 0.5*viewAspect, cpBodyGetPos(ball.body).y/size.height - 0.5, 0.0)
I don't know what "size" is referring to though.
Also, I still think you want the inverse of the ball motion.
Thanks. I solved it. The answer is glTranslatef(0.5*viewAspect - cpBodyGetPos(ball.body).x/size.height, 0.5 - cpBodyGetPos(ball.body).y/size.height, 0.0).
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Reflect a vector in relation to another vector | ipeku | 4 | 4,434 |
Dec 12, 2011 07:17 AM Last Post: ipeku |
|
| Origin problems - rotating shapes | frances_farmer | 1 | 2,222 |
Feb 10, 2007 08:08 AM Last Post: unknown |
|
| Rendering 2D Shadows for Convex Shapes | Nick | 16 | 8,719 |
Nov 28, 2006 11:50 AM Last Post: memon |
|

