It looks like you're new here. If you want to get involved, click one of these buttons!
Hello,
I am trying to develop a program that accomplishes two tasks.
The first task is to create a static body in craft and a dynamic body which interact such that the first body is much like a floor and upholds the second body which has gravity (a ball falling to the ground).
The second objective is to create a class and use the entity:add() method with that custom class and in a very simple way understand what that does.
As of now I have a dynamic icosphere which falls through a “floor” and I don’t know how to setup a custom class for the add method.
Any help appreciated.
Comments
@bjhobson12 Here’s something I already had.
You are awesome—seriously
Just a side node, you don't have to add the model (this doesn't do anything), just assigning it will work.
@John Are you talking about the 2 lines I show below. If I comment them out, everything looks OK but the physics part doesn’t work. The ball passes through the floor. I tried commenting other lines, but then either the object doesn’t show or I get an error.
Ah, never mind I missed the
craft.shape.
part, which makes sense. You were right.