Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 7:18 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Script "IsObjectIntersecting" doesn't recognise tr
PostPosted: April 22nd, 2005, 10:21 am 
Offline

Joined: November 25th, 2004, 2:23 pm
Posts: 24
Location: Wiltshire, UK
Opus: 9.03
OS: Win7 x64
System: ACER i7 4GB RAM
Am I right in thinking the Script "IsObjectIntersecting" doesn't recognise an object's 'Ignore transparent area' setting?

I am using Collision enter actions as a workround alternative to determine when two or more obects are overlapping (where transparent areas are ignored) but this process has its own set of problems.

The objects are .bmp or .jpg images with significant areas of single colour background made transparent in order to only leave the required parts visible.

Is there a script or any other solution? :?


For this message Glen Burn has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 25th, 2005, 11:11 am 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Hi,

Thank you for your enquiry.

I have tried to reproduce your observations, but the IsObjectIntersecting() function definitely seems to respect the Ignore Transparent Area setting.

Please find below a sample publication which demonstrates this. As you will see, the top vector (set to Ignore Transparent Area) is only detected as intersecting once the filled red area enters the blue frame. However, the bottom vector (with Ignore Transparent Area disabled) will be detected as intersecting when the transparent corner of the object enters the frame.

Kind regards,


You do not have the required permissions to view the files attached to this post.

_________________
Robin Garrett
Digital Workshop Technical Support


For this message Robin Garrett has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Still no luck
PostPosted: April 27th, 2005, 4:02 pm 
Offline

Joined: November 25th, 2004, 2:23 pm
Posts: 24
Location: Wiltshire, UK
Opus: 9.03
OS: Win7 x64
System: ACER i7 4GB RAM
Your download obviously works fine for a draggable object which is then moved into contact with another.

I am attemptimg to check the 'intersecting' status by using a Script Action initiated by a left mouse click. The two objects are static.
check1=Frame1.IsObjectIntersecting(Frame)
if (check1=true)
{
Yes.Show()
}
if (check1=false)
{
No.Show()
}

I am getting "Yes" every time, even if the objects are definitiely not overlapping. Is it merely my scripting is wrong?

I attach an amended version of your download for demonstration.


You do not have the required permissions to view the files attached to this post.


For this message Glen Burn has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 27th, 2005, 4:34 pm 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Hi,

Thank you for your enquiry.

You need to use a double equals sign as a comparison operator. Using a single equals sign actually assigns the value to that variable (so 'check' is being made to equal true).

Try the following:

Code:
check1=Frame1.IsObjectIntersecting(Frame)
if (check1==true)
{
Yes.Show()
} else {
No.Show()
}


Kind regards,

_________________
Robin Garrett
Digital Workshop Technical Support


For this message Robin Garrett has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 28th, 2005, 6:10 pm 
Offline

Joined: November 25th, 2004, 2:23 pm
Posts: 24
Location: Wiltshire, UK
Opus: 9.03
OS: Win7 x64
System: ACER i7 4GB RAM
Of course!

My apologies for taking up your time.

:oops:


For this message Glen Burn has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group