playMaker

Author Topic: Spawned player changes size, why?  (Read 2755 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Spawned player changes size, why?
« on: September 15, 2013, 02:53:16 PM »
Hi,

Im Spawning my player prefab using Create Object. The prefab contains a character controller that has a height of 2.1.
But when it appears in the scene its height is 1.5
I have double checked that the prefab that I drag into the Create Object slot is the correct one, And have hit update after setting the height to 2.1.

Why does it change height when I run the game and it spawns into the game?

EDIT: More Info. I now checked what would happen if I changed a different element of the character controller. I changed "radius" to a biger number, hit update, ran the game, and sure enough THAT number DID change. However Height still reverted to 1.5.... WHY???? If one thing changed, why not the other?

Im not sure this is a PlayMaker issue, more of a "prefab" issue. I ask the question here because any question on Unit ANswers results in a request to "see the code".. and there isnt any.. its PlayMaker!

Mark
« Last Edit: September 15, 2013, 02:59:51 PM by markfrancombe »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Spawned player changes size, why?
« Reply #1 on: September 16, 2013, 01:29:41 AM »
Hi,

 Are you positive this value is not scaling or something? And also, are you sure no actions is changin that size without you being aware of it.

pm me with the prefab, and I'll see how it behaves.

bye,

Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Spawned player changes size, why?
« Reply #2 on: September 16, 2013, 04:16:35 PM »
Just tried the obvious test, my prefab in an empty scene...
Everything was fine, I could resize the character and it stayed.

So I got a clue now, it was the spawning, so I spawned the character into the scene, and sure enough it was 1.5.

Scratching my head I performed many new tests.
FINALLY I realised that this FPS character Controller has some additional functions (this is why Im using it after all) It can climb ladders, and crouch, and crawl)

Of course I figured out that 1.5 was the height it goes to if you hit the C (crouch) key..

BUT STILL WHY??

More tests, It seems to like to trigger this functionality when it hits "someone elses code" (the best way I can put it)

For example, in one of my scenes, it will shrink to 1.5 EVERYTIME it goes thru a door! I have of course got some code on the door (half is PlayMaker, for triggering a door sound) and half is UScript (your competitor.. promise I didnt buy it, Im a PLAYMAKER guy... this tint bit of code came with the asset package, and Im using it until its no use to me anymore, maybe thats now..) but I still cant figure out WHY!!!

Anyway, its not specifically a PlayMaker issue, Im happy to share my scene (TO honest, non stealing types only) if someone is willing to take a look, but... its 250 mb

:)

Mark

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Spawned player changes size, why?
« Reply #3 on: September 16, 2013, 04:25:42 PM »
In one of those segments (script/playmaker/uscript) there is probably something unintentionally triggering the crouch state.

Sounds unorganized, difficult to troubleshoot without seeing everything involved.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Spawned player changes size, why?
« Reply #4 on: September 17, 2013, 03:35:42 AM »
I admit it sounds a bit of a mess. Its not really as bad as it sounds however.
Unless I get to the bottom of this, Ill remove the Uscript thing totally. Infact its only left there cos it came with this asset pack and worked fine. So I left it.

Actually, I'm not sure WHY its there, as I use use a totally NON scripted way of opening doors that is built in Unity ( I simply add a hinge joint, and set the constraints- locked doors just have an invisible collider infront that gets destroyed when you have a key. easy-peasy)

But tests have confirmed that in a totally empty scene, just my fps character, and some test objects INCLUDING one of these Uscript doors, all works fine.. so its something more complex. The Crouch state, MIGHT (still not sure) be triggered on LEAVING a trigger area too. I know this because my WHOLE ground floor is encapulated in a one HUGE trigger area that chooses environmental sounds, as we leave this area and enter another, new sounds are faded in. So maybe its multiple triggers overlapping thats the problem?

As I said Im prepared to share the whole scene, (via PM) if someone offers, but as this is probably NOT a PlayMaker issue alone, I hesitate on this forum.

(Id want some vague promises from that person about using assets inn the scene, I paid for some :) )

Mark

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Spawned player changes size, why?
« Reply #5 on: September 17, 2013, 03:47:02 AM »
Hi,

 pm/email me, I'll have a look.

 Bye,

 Jean