How to create a 3D falling box demo in famo.us? - famo.us

I want to create something like this : http://kripken.github.io/ammo.js/examples/new/ammo.html in famo.us.
How do I create a tilted/slanted wall to give the effect of a 2D wall in famo.us?
I am able to create something like this http://hbsand.com/HappyBoxes/ but I want the wall to behave like a 2D wall and not just a line. Perhaps if I can tilt the wall it will give me that effect. I have tried changing the normal of the wall. Also , how to add color and border to the wall ?

Related

Coin3D Crop the current View

In coin 3D, I have a scene setup, and the user can view the scene from various directions using a X,Y and Z and this will move the camera.
when these buttons are selected, I would like the viewer to Basically crop the output and the camera needs to zoom is as close as possible so that I can see the rendering in full at the current angle of viewing.
I have tried various things, including setting up the Camera->heightangle
Setting up Camera->Viewall, but the viewall will make sure the whole scene is visible in all 3 dimensions.
I need a better solution.
please assit.

Render Area Player Would See

So for the game I am working on, I am trying to make a unique type of shader. The majority is very basic, there is just one difficult part. I only want to render what the player would see in their line of sight. This is a top-down 2D game so the player would normally be able to see rooms over. But take this image for example.
Obviously the player here is the orange circle. The area that he can see is the gray ( grey? ) filled in area. The black lines represent a room and the purple lines represent his field of vision through the door of the room. I want to only render the shaded area.
I am aware GLSL has a discard statement where you can remove specific pixels. This means that by making a boolean function I could just do the following code in my vertex shader.
if ( !playerCanSeePoint( params ) ) {
discard;
}
What I don't know how to do though is make the playerCanSeePoint function. One idea I had was to cast invisible lines from the player in all directions and find it's first intersection point. That would mean to first wall and would create the proper shape. This seems resource consuming though. So is there a good way to do this?
You start with a square the size of the view area and then for each wall you cut out a portion of it based on where the player is.
Then you can triangulate the polygon and use a stencil to prevent drawing outside of it.

Changing the displayed direction of an image while it's moving in OpenGL

I'm doing a little something in openGL now and I'm trying to make it so that whichever direction an object is heading, that object displays that direction clearly.
e.g.
If an object that is a dog is heading SW, it should be pointing southwest.
Is there any simple way to do this? glRotatef seems like it would be a valid option at first but I feel like it would get sticky when trying to calculate the angle and all. Especially since this would need to be updated constantly.

DirectX technique to render wingtip vortices

Say if I wanted to create a 3D airplane game and I want to create this special visual effect where the plane wing's create vortices (where it has this line/string coming off the tip of the airplane's wings), how do I go about doing this? I thought about using a very small quad texture (of a white fading effect dot) and output it like particles very close to each other to make it look like its in a line, but I think this will be a bad idea? Is there a better solution to this?
something like this:link

Bending a CCSprite by Skewing it from various points like in photoshop

Hi I am Using Cocos2d with Box2d.
I have a "Stick.png" as CCSprite Now I want to bend it from center downwards and Upwards from the end and start of image.. I am trying to make game like hill Climb that is using only one Green image of a grass strip for the whole vehicle Path/Road used in the game.
I shall be thankful.
Please Help
You can use the skewX skewY properties to achieve this effect. There are also CCSkewBy and CCSkewTo actions to animate skewing.