jaipack17 / Nature2D

A 2D physics engine for Roblox. Create versatile physics simulations and mechanics with GUIs!
https://jaipack17.github.io/Nature2D/
MIT License
147 stars 8 forks source link

Point/Rod not colliding with RigidBody. #10

Closed string-dot-byte closed 2 years ago

string-dot-byte commented 2 years ago

Description

I have a complex shape I constructed using rods and points. It works fine, holds itself properly and collides properly with the screen's boundaries. Although, it won't collide with other RigidBodies.

Reproduction Steps

Create multiple frames and trace them using rods. Try making a part collide with it.

Expected Behavior

I expect the block to hit my structure and make it move.

Actual Behavior

The block can't sense it's existence.

Media

Video: https://user-images.githubusercontent.com/68619882/142733996-9cf3fc55-fdd9-456e-9989-00f41b6a6afa.mp4

Place file: https://mega.nz/file/WdVXQQxZ#H7y496g_JqAbnUvUq44niYUz-R4L8_U19VylXh4BJdE

Encounters

I first encountered this when playing around with points and . Pretty much about an hour ago.

Lastly

I can confirm that I haven't touched anything regarding CollisionFiltering. It also gives me an empty array when I request the FilteredRigidBodies.

jaipack17 commented 2 years ago

While this isn't a bug, its a feature I wish to work on in the coming few days. The feature will deal with creating custom RigidBodies with different amount of sides and structures. While this is possible right now, it will require editing of some 30-40 lines of code which would be a hassle and I won't want you to go through that.

Best solution would be wait a bit until this functionality is added 😄

Something that makes my job easier is that collision detection from the start was made to support RigidBodies with different amounts of sides, so that isn't a problem! The only bit I need to update is how custom RigidBodies would be created, since I merely focused on turning GuiObjects (4 sided) to RigidBodies!

Happy developing!

Edit: May take much more time since I need to refactor a large part of the RigidBody class for this to be supported! Since this change will be crucial, a lot of testing needs to go through. I'll improve the API a bit to fit this change.