Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Problem with ObjectRayCast() after scaling an object.

Author
Message
Zigi
14
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 3rd Mar 2016 11:12 Edited at: 3rd Mar 2016 11:22
Hi all!

I'm trying to pick a 3D object using the ObjectRayCast() command and I have a problem that I can't solve and I would like to ask for help.

The problem is, if I scale the object up or down after it loaded, ObjectRayCast() is till picking the object's original size and If I scale the object down, I can pick the object even if I click around the object and If I scale the object up I'm unable to pick the object on it sides but if I'm clicking somewhere around it original size (the middle of the object).

I don't know if it a bug or If I'm doing anything wrong.
Anyone could help me please?

This is the code I'm using:



In case you would like to test it, I have also attached an example:
https://forum.thegamecreators.com/attachment/77127

Juts select the box using the left mouse button, the box should turn red when it picked and you can scale it up and down using the PageDown and PageUp keys on your keyboard. Once you have scaled the box, deselect the object by pressing Escape key or click away the object.
Try to select the object again and you should experience the problem.

Thank you

Attachments

Login to view attachments
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Mar 2016 14:57
Thanks, fixed for the next version.

Login to post a reply

Server time is: 2024-05-19 00:41:17
Your offset time is: 2024-05-19 00:41:17