playMaker

Author Topic: Vectrosity 3D Ray problems [SOLVED]  (Read 5014 times)

jayhfd

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
Vectrosity 3D Ray problems [SOLVED]
« on: May 06, 2013, 09:43:53 PM »
Hi,
I'm trying to use "Vectrosity Draw 3D Ray" to show the direction that the player has set his ship to travel in, however it doesn't seem to update every frame.

I have a ship position start point for the ray and the direction Vector 3 as the two positions. I'd like to have it so that the line follows the ship through space. Can we have an 'every frame' option, or will this sort of stuff come once more Vector 3 line stuff is in?

I also find it odd that the line sticks to the screen as I pan around... I played with a bunch of 2D line stuff as well and felt that was quite awkward - I had to mess around a lot with world to screen and setting vector 2's from x/y positions, which seems far more complex than it should be?

Regards,
Jay
« Last Edit: May 12, 2013, 05:41:09 AM by jayhfd »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15396
  • Official Playmaker Support
    • View Profile
Re: Vectrosity 3D Ray problems
« Reply #1 on: May 06, 2013, 10:41:50 PM »
Hi,

 Unfortunatly, that action uses a function that do not permit updates, it uses the "SetRay" function. I should have named it so too, that's confusing, and the next update of playmaker vectrosity will correct this.

The hack right now would be to exit the state with "deleteOnExit" set to true, and come back to the state to draw the raw again, if you put a small timer on it, then it will update. If your goal is to debug, then that will do. If you want something a lot smoother, then, it will need to wait for propery 3d vectorline support... I must first finish mecanim/photon/ngui, so don't hesitate to bump this next week or something, thanks!

bye,

 Jean

jayhfd

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
Re: Vectrosity 3D Ray problems
« Reply #2 on: May 06, 2013, 10:57:47 PM »
Thanks Jean,
This is working for now (apart from another bug(?) I've found, see bug reporting). If anyone else is trying the same, I've found that you can't use next frame event or wait AFTER this action, its never called. I set wait first and no problems.

Cheers,
Jay


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15396
  • Official Playmaker Support
    • View Profile
Re: Vectrosity 3D Ray problems
« Reply #3 on: May 06, 2013, 11:11:04 PM »
Hi,

 yes, cause it hasn't got any "finish" call. my mistake...

please find a corrected version attached ( also make delete then the duplicate in your assets, cause I named the file wrong, now it's updated and consistent :) )

[EDIT] Fixed action, please redownload.


bye,

 Jean
« Last Edit: May 12, 2013, 01:10:45 AM by jeanfabre »

jayhfd

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
Re: Vectrosity 3D Ray problems
« Reply #4 on: May 06, 2013, 11:51:37 PM »
Hi Jean,
Are you sure you fixed the 'finish call'? I still have to place wait before this action.

Cheers,
Jay

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15396
  • Official Playmaker Support
    • View Profile
Re: Vectrosity 3D Ray problems
« Reply #5 on: May 07, 2013, 12:23:29 AM »
Hi,

 yes, so maybe your problem is else where, what other actions do you have there?

bye,

 Jean

jayhfd

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
Re: Vectrosity 3D Ray problems
« Reply #6 on: May 07, 2013, 01:01:06 AM »
I'm getting these warnings:

NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.Actions.VectrosityDraw3dRay.OnEnter () (at Assets/PlayMaker Vectrosity/Actions/VectrosityDraw3dRay.cs:65)
HutongGames.PlayMaker.FsmState.OnEnter ()
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState)
HutongGames.PlayMaker.Fsm.UpdateStateChanges ()
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.Fsm.Update ()
PlayMakerFSM.Update ()

And

Can't add script behaviour VectrosityProxy. The script class can't be abstract!
UnityEngine.GameObject:AddComponent()
HutongGames.PlayMaker.Actions.VectrosityDraw3dRay:OnEnter() (at Assets/PlayMaker Vectrosity/Actions/VectrosityDraw3dRay.cs:64)
HutongGames.PlayMaker.FsmState:OnEnter()
HutongGames.PlayMaker.Fsm:EnterState(FsmState)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState)
HutongGames.PlayMaker.Fsm:UpdateStateChanges()
HutongGames.PlayMaker.Fsm:UpdateState(FsmState)
HutongGames.PlayMaker.Fsm:Update()
PlayMakerFSM:Update()

Not sure what they mean exactly...

The only other actions are a wait, a get position and a vector3 operator, both which just run once (not every frame). I'm looping it every .1 seconds with the wait action.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15396
  • Official Playmaker Support
    • View Profile
Re: Vectrosity 3D Ray problems
« Reply #7 on: May 07, 2013, 01:04:42 AM »
Hi,

 you have a conflict of version, that script I sent you requires the latest vectrosity. mayke sure you also get the latest package on the playmaker user wiki.

bye,

 Jean

jayhfd

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
Re: Vectrosity 3D Ray problems
« Reply #8 on: May 08, 2013, 07:12:16 AM »
Hi Jean,
I redownloaded the vectrosity package from the user wiki to make sure I definitely had the latest - also have definitely got the latest version of vectrosity from the asset store, so I think that rules out a conflict version?

I'm also having an issue where I'm losing the ability to receive global events on an FSM with a 3d ray on it, but only when I build - not sure if this is related. I'm having to copy paste the FSM to get it to work again after building.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15396
  • Official Playmaker Support
    • View Profile
Re: Vectrosity 3D Ray problems
« Reply #9 on: May 08, 2013, 11:48:38 PM »
Hi,

 I doubled checked, I am suing vectrosity 2.2 so I up to date here too. Something is odd on your projects I guess. Have you tried a fresh project? maybe something got corrupted or indeed something could be wrong on my end too.

bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15396
  • Official Playmaker Support
    • View Profile
Re: Vectrosity 3D Ray problems
« Reply #10 on: May 12, 2013, 01:09:29 AM »
Hi,

 Ok, I found the source of the problem, I simply overlooked the console... and did not see that error

 I have updated the action, please redownload it.

bye,

 Jean

FritsLyn

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Re: Vectrosity 3D Ray problems [SOLVED]
« Reply #11 on: May 29, 2014, 02:21:43 PM »
BUMP:
jeanfabre wrote:
If you want something a lot smoother, then, it will need to wait for propery 3d vectorline support

I'm looking for a way to draw smooth 3D laser beams in space. I purchased vectrosity and thought it had proper Playmaker Support.. but either I'm missing something or at least there's no manual / back reference to vectrosity code..

How do I get to understand how to use the Playmaker actions? How would I draw floating laser beams in space :)

Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15396
  • Official Playmaker Support
    • View Profile
Re: Vectrosity 3D Ray problems [SOLVED]
« Reply #12 on: May 30, 2014, 08:29:21 AM »
Hi,

 I have planned to give a go at provide more custom actions using Vectrosity, the current set of custom actions only covers 2d lines, not lines in space. I am starting next week on this ( as agreed with another member in need of greater vectrosity support),

so this is coming very shortly. Stay tuned on the Ecosystem Rss feed to know when it's going to be out.

http://feeds.feedburner.com/PlaymakerEcosystem

Bye,

 Jean

 Bye,

 Jean