anyone know how to make the ceiling light when spawned not flop all around and stay at the pos / rotation i set.
Spawn ceiling light and keep position?
I've only had it 'twitch' and flop all about when it's placed either to close to a wall or something else that interferes with it.
The light seems to like it's personal space...
ya i cant seem to make it not want to flop and hold pos i even moded its push var and still flops around.
Did you find a solution? Maybe try messing with its Collider/BoxCollider.
i did not i gave up on it at the moment.
Not sure if this works, but what if you remove gravity for the light?
Rigidbody rigidBody;
var rbody = ceilingLightEntity.GetComponent<Rigidbody>();
if (rbody == null)
{
rigidBody = ceilingLightEntity.gameObject.AddComponent<Rigidbody>();
}
else
{
rigidBody = rbody;
}
rigidBody.useGravity = false;The ceiling light will still stick to the place you choose, but I think (not tested) when you immediately remove gravity, the hanging part will not fall down. Not sure if colliding objects will trigger it falling down tho.
No go.