Scripts / Collision and carrying objects

Author
Message
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 11th Feb 2016 14:42
Q. Is there any way to have an object that the player is carrying have its collision On so it will be obstructed by other entity's, while the player is carrying it?

I have tried every way I can think of, but I still cannot find a solution.

In the attached screen shot I want the desk to collide with the building so the player cannot enter the room.

Cheers
Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Attachments

Login to view attachments
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 11th Feb 2016 14:45
I would say use an invisible block that is dynamic and set a script up to keep the collision on till you need it off, Maybe by distance or some collection of a variable.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 11th Feb 2016 15:06
Thanks Myke,

I think you are talking about a barrier between the desk and the building ?
if so it the same problem, as the desk has it's collision off so you can carry it, so it still goes through a barrier.
If I turn the desk's collision On while carrying the desk, it still acts as collision is off.

Cheers
Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 11th Feb 2016 17:19
Yes, but you (he player) would not, and if you move the blocker away from the door to compensate for the desk depths, then I think you could create the illusion until this gets worked on more.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 11th Feb 2016 17:21
this 1 does as it uses the MoveForward()
it's not as smooth as using setposition though.
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 11th Feb 2016 17:40
Yes, That should work, Thanks Mkye, Nice workaround.

I been wondering if there is an fpe command that could help here, I have tried all the different collisionmodes that I know of, besides the ones for trees, as I don't understand them yet.

I need physics on so items will drop when I let go of them and collision on for other objects.

But ill use your workaround for now.

Cheers
Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 11th Feb 2016 17:50
Thanks smallg
Ill try this out and see how it goes.
I have been using setposition to maintain the desired height and rotation for other objects.

Cheers
Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Login to post a reply

Server time is: 2024-05-03 04:51:15
Your offset time is: 2024-05-03 04:51:15