Pick up and drop and throw objects

I need help with picking up stuff and making it go to the camera at a certain distance
Throwing them when holding right mouse
and dropping them when when you tap right mouse.
please someone help me with this script

Hi @Mason_Rocchio,

So that involves knowing and implementing a number of things, like:

  • Raycasting or triggers for picking the things. Raycasting means you can select and pick it from a distance, triggers are usually for stepping on to them.

  • Mouse input for detecting when the right click is being pressed.

  • For throwing there are several solutions, an easy and funny at the same is with using forces/impulses (physics).

In this page you can find several tutorials/example project to get started with all of that.

https://developer.playcanvas.com/en/tutorials/

Ok thank you, I will let you now if it helps

1 Like

It did not work can you make a script at least that would make the entity go to the camera

How do you find out in one minute that it’s not working @Mason_Rocchio? It takes a lot of time to achieve something, especially if you are a beginner.

1 Like

I attempted the script but I saw that it was not the type of script I was looking for

On the forum you can get some help and inspiration, mostly not ready made scripts. You have to use the tutorial projects as sample to create the script you need.

2 Likes

Ok thanks