MeshDrawer.explosion Distance Parameter is Inoperative

Bug #1663895 reported by Jonathan Kelly
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
Undecided
rdb

Bug Description

At least on Windows 7 and XP using Panda3D versions from 1.8.0 to 1.9.3, the distance parameter for the explosion function of MeshDrawer does nothing. This defeats the purpose of explosion() since you cannot animate the particles radiating out from the center.

Forum Topic: http://www.panda3d.org/forums/viewtopic.php?f=4&t=19307

Example Code:

from direct.showbase.ShowBase import ShowBase
from panda3d.core import MeshDrawer, NodePath

class Test(ShowBase):

    def __init__(self):
        ShowBase.__init__(self)
        self.drawer = MeshDrawer()
        self.drawer_node = self.drawer.get_root()
        self.drawer_node.reparent_to(render)
        self.drawer_node.set_two_sided(True)
        self.drawer_node.set_pos(0, 100, 0)
        self.drawer.set_budget(512)
        self.time = 0
        taskMgr.add(self.update_task, 'universe')

    def update_task(self, task):
        self.time += globalClock.get_dt()
        self.drawer.begin(camera, render)

        # Test that explosion particles expand in all directions by
        # increasing distance parameter over elapsed (delta) time.
        # At least on Windows 7 and XP they will remain at the center
        # regardless of what value the distance parameter is set to.
        self.drawer.explosion((0, 0, 0), (0, 0, 1, 1), 1, (0, 1, 1, 1),
                              0, 5, self.time)

        self.drawer.end()
        return task.cont

test = Test()
test.run()

description: updated
rdb (rdb)
Changed in panda3d:
assignee: nobody → rdb (rdb)
status: New → In Progress
tags: added: windows
removed: particle
Revision history for this message
rdb (rdb) wrote :

This was a Windows-only issue. The random numbers that were generated were not in the correct range.

Thank you for reporting this issue. I have checked in a fix now.

Changed in panda3d:
status: In Progress → Fix Committed
rdb (rdb)
Changed in panda3d:
milestone: none → 1.9.4
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.