I would like to know the coordinates of the point in the HelixViewport3D where I clicking.
My task is:
1) RectangleVisual3D as some surface.
2) Clicking on this surface adding 3d-object under mouse pointer.
I found =>this<=, but could not develop the idea further.
Thanks for help :)
Related
I am developing a WPF application, where I need to allow user to rearrange objects by drag-drop. It is basically dragging objects within a canvas area and moving them to another area of the canvas. The mouse cursor would change to a drag cursor while dragging is happening.
The requirement is like the mouse pointer cannot leave the canvas area while the dragging is in progress. For that I am using the Win32 ClipCursor api to restrict the cursor to a certain boundary of the screen.
This is working fine when mouse is used. However, if touch is used, i.e. if the pointer is moved through touch, it is possible to take the cursor out of the bounding rectangle. Can anyone please help to understand why it is happening? I am handling the PreviewMouseMove and MouseLeftButtonUp events for starting and ending the drag. Do I need to handle the Touch and the Stylus events as well?
Thanks!
As the image shows, two box colliders(2D) stay close together, while a circle collider(2D) fall on the common border.
I hope it will bounce forward (blue arrow), but sometimes it bounce back (green arrow).
I have checked the position and the width, and have make sure the box colliders(2D) are touch to each other perfectly.
(positions: (0,0), (2,0), widths: 2, 2)
I am new on Unity, and have no idea how to prevent the strange bounce.
Please give me some help, thanks.
Image
Maybe It'll work if you edit the colliders like this:
I am not quite sure what is the problem, I hope this helps.
I try to detect when the mouse is over a curve in zedgraph, I am capable of doing it if the mouse is over a point of the curve, but the problem is when the curve has no points in that region,
let me show you an example:
Curve is defined by 2 points: [X=0;Y=10] -- [X=1000;Y=10]
If mouse is at point [X=500;Y=10] it is over the curve, but not over any point so i cannot detect it.
Is there any event which gets fired when mouse is over line but not necessarily over a point?
Thanks
No, this must be done by manual interpolation. See answers posted to my similar question, showing an example of a FindNearestCurve function (I have not tested it)
https://stackoverflow.com/a/5885812/445533
(There is FindNearestObject which works for LineObj though, as detailed in those answers)
I have to create a sample silver-light page that has some user interactive elements like -
1) A ball and two arrows for left and right directions.
Clicking on any arrow should cause the ball to move in that direction.
2) A drag and drop functionality for some object on the screen.
3) Clicking on a ball should make it rotate.
Please help me as i m new to this area.
Thanks in advance.
You can use the Animations using xaml
If you have the Microsoft Blend then it is very easy to animate
example
I have the ball in the very right bottom side. When I click somewhere, I want to be able to figure out the direction I clicked and once the user starts to drag, I will calculate the distance. Once the user lets go of the mouse, I want to give the ball some velocity and have it move towards the direction it was first clicked.
I don't know the formulas to compute these things. Any help with explanation is greatly appreciated.
Thanks.
You can check the first mouse down Mouse.GetState() (I think) and save it to a variable. Then check, if the mousedown-state is still given (do this in the Update() function), if not, this will be your destination point. Now you have a starting point and destination point, so you can move your ball in the update-method through the destination point. I hope, the explanation is clear :)