Any way to make an ent Keep Upright through lua?

I’m creating an entity, but when spawned the ent creates itself a little off of the ground. (in my EyeTrace, but not against the floor)

Is there any way to make the ent keep upright in lua? Or is there a way to make this entity spawn on the ground where I’m aiming?

Thanks

Something like this could be used to spawn it on the floor where you’re aiming.
[lua]
local ent = ents.Create(“dat_entity”);
ent:SetPos(Player:GetEyeTrace().HitPos+ent:OBBCenter());
ent:SetAngles(Player:GetAngles());
ent:Spawn();
[/lua]

id rather just use zero angles


ent:SetAngles(Angle(0,0,0))