Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Slav on March 17, 2011, 04:08:01 PM

Title: What is the alpha threshold?
Post by: Slav on March 17, 2011, 04:08:01 PM
Hello.
When engine tests hit point on "click" which alpha value means that object was clicked? I mean how much alpha is it need for image to have to be clickable?
Alpha varies from 0 to 255.
Title: Re: What is the alpha threshold?
Post by: Mnemonic on March 22, 2011, 09:28:04 AM
Alpha < 128 is considered transparent.
Title: Re: What is the alpha threshold?
Post by: Slav on March 22, 2011, 11:10:48 AM
Thank you.
Title: Re: What is the alpha threshold?
Post by: Slav on April 19, 2011, 09:54:43 AM
Hmm... I have the glass jar which is almost impossible to click within my ported version (original C++ engine permits to click this jar well) - it's alpha is near 60. May be there is some logic which intends to apply click on even transparent object in case there are no objects below it?
Title: Re: What is the alpha threshold?
Post by: odnorf on April 19, 2011, 10:29:09 AM
You can add a region entity on top of the object in SceneEdit.
Title: Re: What is the alpha threshold?
Post by: Slav on April 19, 2011, 10:36:49 AM
The problem is that I port already written game from original WME to Flash (AS3) version and I must simulate whole it's behavior.
Title: Re: What is the alpha threshold?
Post by: odnorf on April 19, 2011, 11:10:32 AM
Adding the region entity will make the object clickable which, as I understand it, it's the behavior you want?
Title: Re: What is the alpha threshold?
Post by: Slav on April 19, 2011, 01:38:22 PM
I must not edit game's source scripts - I must port it from original WME implementation to FLASH one "as is".
Title: Re: What is the alpha threshold?
Post by: metamorphium on April 19, 2011, 01:55:02 PM
Slav, yes. if there is region entity in that scene in question, covering the image, the full shape of that region is clickable. Also if the image in question is not image but sprite, it's possible to turn off pixel perfect which again allows the full shape to be clickable.