About Store Forum Documentation Contact



Post Reply 
Detecting objcts under cursors - problem
Author Message
Truelegend Offline
Member

Post: #1
Detecting objcts under cursors - problem
I trying to detect object under cursor so i writed
Code:
REPA(Statics)
   {
       Statics[i].group(GROUP_OBJ).user(Ptr(i));
   }

But Statics doesnt have function group :( ?? how i can do that ?
Okey i solved it it was:
Code:
Statics[i].actor.group...

Sorry pfft
(This post was last modified: 07-02-2011 11:55 AM by Truelegend.)
07-02-2011 11:51 AM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #2
RE: Detecting objcts under cursors - problem
Do you use Physics.ray? If you want check if ray hits only Static objects use callback. I think that there is some tutorials how to use Physics.ray (even in Bloody Massacre).
07-02-2011 11:57 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Truelegend Offline
Member

Post: #3
RE: Detecting objcts under cursors - problem
ok Detecting is working now i want to make player move to mouse pos.
Code:
Vec dir_p;
   Vec pos_p;
   ScreenToPosDir(Ms.pos(), pos_p, dir_p);
  Player.actionMoveDir(Vec(dir_p.x, dir_p.y, dir_p.z));

it shows:
1>------ Build started: Project: Tutorials, Configuration: Debug Win32 ------
1> Main.cpp
1>c:\users\damian\desktop\ee sdk\tutorials\source\main.cpp(63): error C2143: syntax error : missing ';' before '.'
1>c:\users\damian\desktop\ee sdk\tutorials\source\main.cpp(63): error C2143: syntax error : missing ';' before '.'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
07-02-2011 12:37 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #4
RE: Detecting objcts under cursors - problem
Sounds like Player isn't a variable. You sure you don't mean Players[0]. or (if the code's executing in Player::update) simply actionMoveDir? Also, you can just use actionMoveDir(dir_p), no point to create another Vec.
07-02-2011 07:37 PM
Find all posts by this user Quote this message in a reply
Post Reply