playMaker

Author Topic: how I can get distance from 2 vectors? I can only meature to object...  (Read 5277 times)

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
I want measure a point to the mouse pick place, I try to use distance event to do it, but distance can only measure object to object, how i can measure the distance from an vector to another??

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
and~~ when i use mouse pick the surface's normal, how i can create an object follow the normal? I try to pick the suface's normal and set it to an instance's rot, but it seem not so correct

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
I hope it can be generate like this

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
but it just like this

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
the rot value is picked, but I dont think its the right number.
......
help..... T T

Iwa

  • Playmaker Newbie
  • *
  • Posts: 6
For your measure : One solution is to use the action Vector Substract and then Get Vector Length :). I'm not a pro, so here is my little idea :)

I can't help you at all for the rest
Mess with the best, die like the rest

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
thank you! I will try

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 For getting the normal and have an game object follow it, i did a working example a while back on this forum, can't find it, but will search better and give you the link asap

For distance, iwa is correct, to get a feel for vector operation, simply google for it, and then apply this with the actions provided, there is little you can't do with playmaker on that matter.

Bye,

Jean

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
 :) really thank you !