You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thanks for writing and maintaining such a great library.
Whilst familiarizing myself with it I ran into a few issues.
1.
Either I'm not understanding how to use the MTV from intersections or it is a bug.
Depending on the actual overlap the normal can point in the opposite direction that it should.
Here is the code for the collision example.
Another issue I had is attaching a shape, which rotates around its center, to an Object. (actually an issue for any attached rotating shape)
consttileSizefloat64=32// Object that would be axis alligned for AABB collision checksobject:=resolv.NewObject(0, 0, 2*tileSize, 2*tileSize, "solid")
// Shape that can rotate around its center and can fit into object (independent of its rotation)shape:=resolv.NewConvexPolygon(
tileSize, tileSize,
-tileSize/2, -tileSize/2,
tileSize/2, -tileSize/2,
tileSize/2, tileSize/2,
-tileSize/2, tileSize/2,
)
// Adding the shape to the object calls the update method // and overrides the shapes position to that of the object // -> the shape pokes out of the objects bounding box and is missallignedobject.SetShape(shape)
Thanks a lot in advance.
My current solution is to have the shape and object separated inside a struct and to update them separately.
Is there really no way to attach a shape with a relative position?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First of all thanks for writing and maintaining such a great library.
Whilst familiarizing myself with it I ran into a few issues.
1.
Either I'm not understanding how to use the MTV from intersections or it is a bug.
Depending on the actual overlap the normal can point in the opposite direction that it should.
Here is the code for the collision example.
Another issue I had is attaching a shape, which rotates around its center, to an Object. (actually an issue for any attached rotating shape)
Thanks a lot in advance.
My current solution is to have the shape and object separated inside a struct and to update them separately.
Is there really no way to attach a shape with a relative position?
Beta Was this translation helpful? Give feedback.
All reactions