Hi, How can I create 3D (look like 3D) rolling ball with Box2d in cc ?
I found this video but the author did’t explain how to implement.
He just said :
You can determinate x rotation by the change in x position divided by the circumference.
y rotation is determined by the change in y position divided by the circumference.
z rotation uses real 2d rotation.
If you use quaternion you simplify life
Hmmm, maybe, but everything in video is 2d except balls!!
So if the balls are 3D it means that there is no way to implement rolling ball in cc!!
Am I right??
There is a glRenderSphere.cpp file in open solution in the vid
I think easiest way to draw a textured sphere in Creator would be by applying a pixel shader to empty quad. Tricky part (as you mentioned) would be mapping spherical coordinates to texture UV, but there should be a lot of info on this problem around the internet
Yes I think so. But the problem is that I’m not familiar open gl shader but I know HLSL.
And another problem is that I do’t know how to use GL Shader in cc.