Hello,
I'm using box2DFlash but hopefully that shouldn't change much.
I got a generated terrain using .SetAsEdge and the shape of the edge is as follows: .__
The dot being the position.Set(); and the SetAsEdge() is set relative to it's position.
Now when i have a shape colliding with the terrain i want to use a raycast from y:0 and the x corresponding to the position of the nodes, all the way down till it hits the shapes. I was hoping to be able to get the y coordinate from the point it hit the shape so that i can raise the terrain to match the height of the object.
How should i go about this and is a raycast even the way to go?
I'm using box2DFlash but hopefully that shouldn't change much.
I got a generated terrain using .SetAsEdge and the shape of the edge is as follows: .__
The dot being the position.Set(); and the SetAsEdge() is set relative to it's position.
Now when i have a shape colliding with the terrain i want to use a raycast from y:0 and the x corresponding to the position of the nodes, all the way down till it hits the shapes. I was hoping to be able to get the y coordinate from the point it hit the shape so that i can raise the terrain to match the height of the object.
How should i go about this and is a raycast even the way to go?