Interaction with a 3D Cube

I m development of a Web page where it should be a 3D cube, and each of its faces has point to another URL. I have already built and shaded the cube. I also coded in the part of the rotation of the cube. But I've always found the part where the click on a certain face lead me to a specified URL.

I wrote this code in order to find the way to see the face that was clicked:



****************************************************************************************** *****************************************

on mouseUp me
returnData = .modelsUnderLoc member("3D").camera [1] (the mouseLoc, #detailed)
Member ("TXTcara"). Text = 'You clicked on face' & & .faceID returnData [1]
end

****************************************************************************************** ***************************************
where TXTcara is a textfield on the stage where I print what a face has been clicked



But he always tells me that I clicked on the side 1 or 2. I mean a cube has 6 sides... and copy the following code declares that she has two!

How I can certainly find out face that has been clicked?

The cube was built like a box.

the face is the polygon and not the face of the cube.
If you use the built-in modelresource.ca each face of the cube has a separate shader (watch it models shaderlist). I am sure, that you are going to assign different shaders faces different clickable cube. so, you need get the shader that was clicked on.
This information is the #meshID of the collection of data that is returned by the functions of collection (modelunderloc and modelunderray), if the #detailed value.

so in your case:

on mouseUp me
returnData = .modelsUnderLoc member("3D").camera [1] (the mouseLoc, #detailed)
Member ("TXTcara"). Text = "You clicked on face" & .meshID returnData [1]
end

I assume that your statement is a sample quick to point the problem, but just in case... you should check, if a model was hit in the first place and the above behavior is often on the 3D sprite and if you have only a camera you could get out with all code it hard (member name, camera index etc.) with :

on mouseUp me
SP = sprite (me.spritenum)
ml = the mouseLoc - point (sp.left, sp.top)
Cam = sp.camera
returnData = cam.modelsUnderLoc (ml, #detailed)
If count (returnData) > 0 then member("TXTcara").text = "You clicked on face" & .meshID returnData [1]
end

Tags: Director

Similar Questions

  • Loaded with FF on laptop (Win 8), why is there no way to interact with it?

    FF loaded on my new laptop using Windows doesn't have a toolbar to allow me to interact with him. What can I do about this problem?

    East - the normal Windows 8, no RT?

    If you don't see any of the regular bars (e.g., tab, toolbar, toolbar bookmarks bar), your Firefox can be full-screen mode. The F11 function key toggles between the normal modes and full screen.

    If you have a tab bar, you can right click on an empty area of it or click New tab (+) and select missing toolbars from the menu that appears.

    A little luck?

  • Able to interact with a Panel before the remote cRIO to a computer, but not another

    I have a cRIO application that publishes a remote façade for the monitoring and control of the application. A PC (Win7 & firefox), I can see, interact and control the cRIO through published remote façade. A second PC, also Win7, I can see and monitor the status of the cRIO, but no interaction does not control remote that opens and it's true that I use IE, FF or Chrome as a browser. When a PC is connected to the cRIO, via a dedicated Ethernet connection and only the cRIO and PC are on this network. For this private network of two devices, the PC is always the address 192.168.1.1 while the cRIO always use 192.168.84.199 (port 8000).

    The rules of firewall on both computers are configured to allow all inbound and outbound programs/ports/protocols to be used between these two IP addresses.

    Two PC's have development systems LabVIEW to update installed on it (which more or less guarantees that they have the minimum requirement LV of execution necessary to see and use a remote façade).

    What may be different on the PC who discovers, but cannot interact with the remote control?

    Right-click on the second, and then select "take control of this VI.

    As far I know - that a viewer of the remote façade can control the frame at any time - the rest cannot display.

  • How can I interact with mainvis and subvis without closing any of them?

    I have a mainVI which opens a Subvi perfectly and I m using the "VI Open reference' & the 'node of reference VI to call' to run the Subvi. However, once I open the Subvi and it s running, I can´t do something with the mainVI. The only way to interact with the mainVI new it s closing the Subvi, I want Don t that happens because I need the two work together and interact with both at the same time.

    Is someone can help me?

    Thank you

    Make sure that the property of Subvi is not floating or modalvalue.

    (Properties of VI... appearance of windows...... customize the behavior of windows)

  • Interact with a CGI web page

    Greetings OR Forums,

    I am developing a telescope pointing control system that needs data ephemerides generated from a Jet Propulsion Laboratory web site:

    http://SSD.jpl.NASA.gov/horizons.cgi

    The main interface of their horizons system is via Telnet which is precarious and is no longer supported by LabVIEW.  I was hoping that someone could advise me on how to start using LabVIEW to interact with the web page of cgi based at the above address.  If I can do it, I can retrieve the necessary ephemeris data and analyze inside LabVIEW using the commands of the base string.

    Is there a kit of basic tools that you can point me to interact with web pages or any code sample?

    Thank you
    Scott

    High Altitude Observatory

    Boulder, CO

    Use screws of HTTP Client:

    VI GET is the standard demand 'give me this web page' - give it the URL of your ephemeris data session and the release of 'body' will give you the web page content - if you use the raw text of output, then this should make analysis easier chain (without tags html etc..).

    (In addition, you can use Telnet in LabVIEW, it is not a library group for her more - you should be able to use the TCP screws to roll and you can also if interface with other libraries/applications Telnet for example PuTTy... it might even be something in .NET)

  • Microsoft 3000 wireless keyboards; they will interact with each other

    I have 2 PC and I would like to replace the wired keyboards for 2 sets of Microsoft 3000 keyboard, will they interact with each other and can I change Ch / Freq of the units

    Hi Baz,

    Each keyboard has different frequency and will not interact with each other.

  • problem caused this blocking the program interact with Windows

    I got this message "a problem caused this program blocking interact with Windows" when I m access share foder in Windows xp

    Hello

    ·         You have made no changes to the computer until the problem occurred?

    Method 1:

    I suggest you to check for the problem in safe mode, follow the link below.

    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    Method 2:

    You can also put your computer to boot and find the faulty program that is causing the problem by following the link below.

    http://support.Microsoft.com/kb/929135

    Note: Make sure you put the computer in normal mode by following step 7 after that solve you the problem.

    Method 3:

    You can also check the observer event log to check which program is causing the problem. Check in the event viewer, follow the link below.

    http://Windows.Microsoft.com/en-us/Windows-Vista/open-Event-Viewer

  • Windows Mail is not interacting with the server.

    When Windows Mail (WM) is open, it will download 2 of each incoming e-mail.  Conducted a comprehensive analysis of the system, no problem.  Talked with our server provider, we ran the test emails to see if WM was interacting with the server and it is not.  Is also not to keep my ID and password to log on the server. Y at - it an update I missed it to avoid these problems?

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    It causes a frequent there have new antivirus scan program messages.  Uninstall your AV program and reinstall without any mail analysis feature.  You will be just as safe.

    Another common cause is to have two e-mail accounts, referring to the same mailbox.  The send/receive operation can access two accounts at the same time and both can download the message even if they both refer to the same mailbox. Brian Tillman [MVP-Outlook]

  • OS 10.3 / WebView: no interaction with the Google Maps Javascript API

    Hello

    Google Maps Javascript API no longer works correctly using the Web on OS 10.3.  On all the operating system previous releases everything worked perfectly fine in WebView but on OS 10.3 even if the plan (or view, or anything else provided by Google APIs) is displayed correctly, there is no interaction whatsoever with it - no response to taps, none is panoramic, no zoom, etc.

    I don't speak of the 10.3.0.698 Simulator - I do not have access to the true OS 10.3 device.

    Even simple examples of Google Maps doesn't work, try for example:

    import bb.cascades 1.2
    
    Page {
        Container {
            preferredHeight: 720
            preferredWidth: 720
            WebView {
                preferredHeight: 720
                preferredWidth: 720
    
    url: "https://google-developers.appspot.com/maps/documentation/javascript/examples/full/marker-simple"
            }
        }
    }
    

    The map appears, but there is absolutely no interaction with it - just a STATIC content.  On OS 10.2.xxxx, it works perfectly fine...

    P.S. If you open the same example URL directly in the web browser on OS 10.3 everything works well - responds to taps, she can be zoomed, panned, etc..    So, it's apparently a problem with user agent (which is probably the same web browser both webview).  Change the user agent in WebView to e.g. Z10 user agent doesn't help, either.

    Can anyone help?

    Your sample application does not seem to suffer the original bug, I thought. That bug could cause a WebView with no ancestor ScrollView would get too small window Visual and tactile input would be anchored to the Visual display window very small. If you want to learn more on this topic, see a tale of two windows - part for the discussion of Visual and updated display on the page. Perhaps your sample application it is OK because it specifies a preferredHeight for Web display, which can affect the used Visual display window.

    To be more precise, on a real device of passport BlackBerry running OS versions 10.3.0.1052 and 10.3.0.1154, the sample you provided responds perfectly to press ENTER.

    However, on the Simulator on OS 10.3.0.698, I can confirm input touchscreen does not work. Therefore a separate bug, which seems to be specific to the Simulator.

    I think you can be assured that end users will still be able to use your app (s) on a real passport of BlackBerry device, but it is unfortunate that it does not work on the Simulator.

  • BB10 - interaction with a childwindow

    Hi all

    I have a child with interaction with a window problem.

    I developed an application with phonegap (2.7.0) and I'm trying to make a paypal payment in my application.

    This requires to open a child window to display the connection at Paypal and after checking paypal redirect me to what I want.

    My problem is that I have no way of knowing if the transaction is completed and when to close the window.
    Ideally, I would like to read the url inside the childwindow to act accordingly, but once I opened my window, I can't do anything in it.

    So here is my appeal:

    childwindow = window.open('https://www.sandbox.paypal.com/webscr?cmd=_express-checkout-mobile&token='+token, '_blank');
    

    My childwindow object contains managers of loadstart, loadstop and output.

    I suspect that the inAppBrowser of phonegap is just useless and prevents me from using the childbrowser good webworks.

    Anyone had this problem before?

    Thank you

    Hi Erik, thanks for your response.

    I finally solved my problem: the new phonegap feature inAppBrowser.

    Since Cordoba 2.3.0 introduced a childBrowser based on one of the previous plugins. Problem is that if it works pretty well on Android and iOS, they have not spent time at all on Blackberry, I would say. Their instance replace the webworks one, but on this one, you cannot run any code in the child window, so no way of knowing the location currently.

    I disassembled this inAppBrowser in the Cordoba code relief on the webworks on blackberry and everything is okay now: finally access the location.href and use a setInterval to close the window after redirect as suggested by Erik.

    Hope this will help people to this question too.

  • The iexplore.exe program ceased to interact with Windows and was closed

    The version of iexplore.exe 9.0.8112.16447 program ceased to interact with Windows and was closed

    This happens from time to time only.

    Hello

    Follow these methods.

    Method 1: I suggest that scan you Chccker file system (CFS) on the computer that would be a system file corrupt on the computer search and replace.

    http://support.Microsoft.com/kb/929833

    Method 2:  If Internet Explorer does not work, you can try to disable Internet Explorer and then enable the feature that is as good as the uninstall and put it back.

    Follow the steps below to do the same.

    To enable or disable the Internet Explorer, follow these steps:

    a. click the Start button, select Control Panel, click programsand then click Windows turn on or off features. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    b. uncheck Internet Explorer. Click OK and restart the computer.

    c. now follow the same steps to activate Internet Explorer by selecting the checkbox.

    Access the link for more information on the above steps to turn off or on the features of Windows 7.

    http://Windows.Microsoft.com/en-us/Windows7/turn-Windows-features-on-or-off

  • Interaction with the BlackBerry via USB

    This may be the wrong forum for this question, and if so, please point me to one that is more appropriate, because it doesn't seem to be a forum of developers on this segment of use cases.

    Is there a material that interacts with the BlackBerry through the USB connection?  The BlackBerry Desktop Manager can make quite a range of things with the BlackBerry via a USB connection.  None of this is publicly available or documented?  If this isn't the case, it is fine, please tell me if I can stop looking in vain for him.

    There was an example of code, packed with JDE 4.1, I think, who communicates with the BlackBerry via USB using BBDevMgr as a resource com  There is a lack of documentation of this interface and its capabilities and limitations.  It is still supported?  If so, where can I find the documentation for it?

    Thank you for your time.

    It is still supported.  You can find the documentation in the "use USB or serial port connections" section of the BlackBerry Java development environment development Guide found here:

    http://NA.BlackBerry.com/eng/support/docs/subcategories/?usertype=21&category=BlackBerry+Java+applic...

  • Screen popup but keep interaction with stacked screen

    Hello

    I'm developing an application in which I want to display a message to the user but I want to keep interacting with the screen.

    The idea is that, when the focus is on an image, appears the name of the image, but the user is able to move the focus to another element.

    I need popup, a screen because I don't want to change the layout of the stacked display.

    Is it possible to do this? Any example or an idea to follow?

    I tried to push the screens in Modal and Global mode, but when I pop up I lose interaction with the stacked display.

    Thanks in advance,

    Carles

    All UI events go the screen that currently has the focus.

    Two things I can think of:

    * maintain an ack of on-screen originak callback mechanism so that the UI events may be returned

    * Do not use popup screen - simply paint the tip when it is appropriate and remove it when the focus moves to another element.

    Probably, I would lean towards the second solution - we do it for the ToolTips currently and it works fine.

  • Web pages display lingers when hidden - not hidden until the screen interacted with

    Just had the time to find the solution to this problem, that I experienced. Impossible to find a solution from the forums search.

    I used a QNXStageWebView and I wanted to hide when the user switches to another view of the application. I tried to set the scene on a null value, the zOrder-1 and the visible to false. None worked without a problem, as the webView wouldn't be hidden until the user attempted to interact with the latter, when the UI would suddenly be cool and hide the persistent webView.

    See below for the solution.

    The solution: set the viewport to null, in addition to affecting the zOrder-1, when you want to hide the QNXStageWebView.

    webView:QNXStageWebView = new QNXStageWebView();

    webView.viewPort = null;

    webView.zOrder = -1;

  • j could be able to hear myself after I recorded my voice or when I interact with someone on Skype I can hear them but they can't hear me back

    I can't hear myself or my own recorded voice, whenever I interact with someone on Skype, they hear me well, but I can't hear them back
    It would be best if you contacted Skype support team regarding this issue.

    They are experts in the field of your request and would be in a better position to answer your concerns. You can contact them through this link:


    You can also join the community of users here:

Maybe you are looking for

  • How can I install windows 7 32-bit 0n hp spectrum xt ultrabook 13-2308TU

    Hello everyone I want to install windows 7 32 bit on my laptop which is "hp spectrum xt ultrabook 13-2308TUi. but I could not find the drivers. any suggestons do not hesitate. Thank you

  • CLIP + PROBLEM

    I got my Clip + for less than a month, and it worked perfectly until this morning. I always charge my player from one day to the next, and it works fine the next morning. However, I woke up and checked my clip +, and it was VERY hot.  Like when your

  • Bridge no longer works

    I just upgraded to LR CC and it would never run.  Finally, nobody on the web was the answer, and it now works.   Bridge, however... I use Windows Pro 64. When I double-click on the bridge, he rises but shows not all images (and this folder has a lot

  • What is the prefix ORCL for ASM disks?

    version: 11.2 / RHEL 5.8 Once the ASM disk is created using the oracleasm, you can add the ASM disk to the disk as a group SQL> alter diskgroup DATA1 add disk 'ORCL:DISK2'; Diskgroup altered.Is the prefix "ORCL:" mandatory? What is it, anyway?

  • Find the path to the virtual machine so disconnected in the inventory?

    Hai everybody,How to find the path to the virtual computer files if the virtual machine is disconnected. Can anyone suggest where can find the KB articales related to issues of the VM.