|
| 09 Jan 2017 08:22 PM |
| I need to write a scripts that positions items a player drops on the top surface of surrounding parts, especially the part the player is standing on. For instance, if a player drops a gun, it will be positioned on the surface of the part the player is standing on to appear on the ground. Or, if a player drops a gun around a counter top or any other part, the item will position on top of the part. |
|
|
| Report Abuse |
|
|
Swordlust
|
  |
| Joined: 05 Dec 2016 |
| Total Posts: 476 |
|
|
| 09 Jan 2017 08:45 PM |
Why? Can't you just insert a bodyposition/gyro? And you could select a range around your characters torso from where you want the object/tool to be dropped.
|
|
|
| Report Abuse |
|
|
|
| 09 Jan 2017 09:03 PM |
i mean if the player is standing, some simple math will do
leg.Position - leg.Size/2
Formerly xXTheRobotXx, add 13,349 posts |
|
|
| Report Abuse |
|
|
Swordlust
|
  |
| Joined: 05 Dec 2016 |
| Total Posts: 476 |
|
|
| 09 Jan 2017 09:06 PM |
But I don't get it, why does the tool have to be dropped and laid right where it was before it was dropped? Why not just select a random position around the surface/players range?
|
|
|
| Report Abuse |
|
|
|
| 09 Jan 2017 09:06 PM |
"But I don't get it, why does the tool have to be dropped and laid right where it was before it was dropped? Why not just select a random position around the surface/players range?"
lol with my game i just unequip the tool on my npcs and let physics do the rest
Formerly xXTheRobotXx, add 13,349 posts |
|
|
| Report Abuse |
|
|
Briicks
|
  |
| Joined: 03 Apr 2015 |
| Total Posts: 1796 |
|
|
| 09 Jan 2017 09:08 PM |
Maybe it does not have to be, maybe it's just because that's what he/she wants.
|
|
|
| Report Abuse |
|
|