MsHannerBananer
Member
Posts: 218
Threads: 34
Joined: Sep 2013
Reputation:
10
|
RE: Teleporting-Naked-Guy Help
(07-05-2014, 10:43 AM)CQBgamer Wrote: (07-05-2014, 10:25 AM)MsHannerBananer Wrote: As for having the cabinet doors open... I know that the metal cabinets have door names, but I'm sure it's the same for the fancy wood cabinet as well. You'd need to add a PropForce to each individual door, but this is easy.
AddBodyForce("cabinet1_rightDoor", 0, 0, -900, "world"); AddBodyForce("cabinet1_leftDoor", 0, 0, -900, "world");
So, if you had a cabinet named "cabinet1" you add "_rightdoor" or "_leftdoor". Use both to open both doors, or just one.
The values (0, 0, -900) are the X, Y, and Z axis'. So you would adjust this to what axis you want the doors to swing open on and also adjust for the positive and negative values. You can play around a bit to see what gives you the best results. I also believe that the higher the value, the harsher the doors swing open, so -900 is naked guy jump scare value, haha.
EDIT: I assume "Harry Potter's" suggestion might work, never tried it myself though so I wouldn't know. Try either, and chose what's easiest, haha.
I dont have an issue getting the doors open, because the Addforce script on the corpse still pushes his feet foward thus opening the doors, but since the model spawns in T-Posed there is no way I can position him inside the cabinets that his hands wont be touching the sides. If there is no other way to fix that would it just be possible to disable collisions between the corpse and cabinet and then just use the code you provided to simulate him hitting the doors? If so what code would I use to disable the collision between the corpse and cabinet?
I edited my post, haha. I didn't read close enough, but I'll just paste what I said. Sorry man. I'm dumb, lolol.
Just click off the little magnet (which is the snap tool) so you can move around your guy so he isn't touching the walls. This would be a little more difficult for the iron maiden, however if you made the iron maiden big enough, it's fine. You could also shrink down the size of your naked guy (a little or a lot.) Who says all the bodies have to be the same size? It would be hilarious at the same time as it would be surprising.
|
|
07-05-2014, 10:46 AM |
|