Nature2D icon indicating copy to clipboard operation
Nature2D copied to clipboard

Get name of obj that touched the rigidbody using .Touched

Open NuggetXX2000 opened this issue 1 year ago • 2 comments

Description

What do you need help with/what is your query? Describe in 30-40 words or more!

When using .Touched, I am unable to get the name of the obj that has touched the rigidbody

example: sprite.Touched:Connect(function(id) objTouched = engine:GetBodyById(id) print(tostring( objTouched.Name )) -- Returns nil, I've tried many other ways but it returns a table value or just the id end)

So far I have

What have you tried so far? (Optional)

Searched online, searched nature2d forum

Lastly

Anything else you would like to share?

If this is an easy fix I'll feel stupid

NuggetXX2000 avatar Dec 07 '23 11:12 NuggetXX2000