≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
How to Linepick Clones and animated Meshes??
Posted by:
(you are not logged in)
Enter the missing letter in: "Inter?ational"
(you are not logged in)
Text:
[quote][b]csp-games[/b] wrote: Ok, I may have found a way to work around this problem: I don't use Linepick at all, but create a bullet mesh. To this mesh I add the collision response animater, just like I did with the fps camera. Then I shoot the bullet in the wanted direction, move it to a certain point, weapon max range away. Then, AFTER the next collision response took place (I yet have to figure out how to determine that), I compare the actual position of the bullet to the wanted position. If they are not the same, the bullet hit a wall. As I was able to add collision to clones and custom made meshes, this should work. It still doesn't tell me what node was hit, but I could then eg. see what node is closest to that point (seems unreliable), or go trough the triangle data and find a triangle that represents a plane on which the new position of the bullet is co-planar, maybe by using [code] var myplane= new CL3D.Plane3d().setPlaneFrom3Points(point1, point2, point3) [/code] That said, I have no idea how those planes should be used, see: https://www.ambiera.com/copperlicht/documentation/symbols/CL3D.Plane3d.html After all this being said, I am seriously thinking about to implement my own mesh loader code that keeps all triangle data in quickly accessible arrays, so I could just do a plain 3D math ray-intersects-triangle check. It may seem complicated, but in fact it boils down to a simple port of the RIT function from Blitz3D (where I got the Moller algorithm working) to javascript. Alternatively I could try to obtain the triangle data from ccbz-loaded meshes using CL functions, and then do that homegrown ray intersection test. At least these are now 3 potential solutions to the problem. If I can make one of them do the job, I'll post it here.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact